{include file='../public_btn.html'}
<h3 class="info-tag">
    明细列表(共{$page_total}个明细)<span></span>&nbsp;&nbsp;&nbsp;&nbsp;
    <b>资金总计: </b>
    第三方支付￥<span>{$total.amount}</span>
    可用余额￥<span>{$total.user_money}</span>
    冻结余额￥<span>{$total.frozen_money}</span>
    {$L.unit_db_points} <span>{$total.db_points}</span>
</h3>

<div class="html-box">

    <form class="cond-form clear" action="#!member/account_log/{$row.mid}" id="searchForm" method="get">
        <input type="hidden" value="" name="page" id="page">
        <input type="hidden" value="{$smarty.get.mid}" name="mid">
        <div class="f-unit">
            <select name="k" id="k">
                <option value="desc" {if $smarty.get.k eq 'desc'}selected{/if}>描述</option>
            </select>
            <input id="q" class="form-i w160 sitem" name="q" value="{$smarty.get.q}" type="text">
            <div class="l">
                <select name="stage">
                    <option value="">-操作类型-</option>
                    {foreach from=$stages item=m}
                    <option value="{$m.key}" {if $m.key eq $smarty.get.stage}selected{/if}>{$m.title}</option>
                    {/foreach}
                </select>
            </div>
            <div class="l">
                <select name="points">
                    <option value="">-币值-</option>
                    <option value="amount"{if $points eq 'amount'} selected{/if}>第三方支付</option>
                    <option value="user_money"{if $points eq 'user_money'} selected{/if}>可用余额</option>
                    <option value="frozen_money"{if $points eq 'frozen_money'} selected{/if}>冻结金额</option>
                    <option value="db_points"{if $points eq 'db_points'} selected{/if}>{$L.unit_db_points}</option>
                    <option value="pay_points"{if $points eq 'pay_points'} selected{/if}>{$L.unit_pay_points}</option>
                    <option value="rank_points"{if $points eq 'rank_points'} selected{/if}>经验值</option>
                </select>
                <select name="sortorder" id="sortorder">
                    <option value="">-排序-</option>
                    <option value="DESC" {if $sortorder eq 'DESC'}selected{/if}>降序</option>
                    <option value="ASC" {if $sortorder eq 'ASC'}selected{/if}>升序</option>
                </select>
            </div>
            <label class="ui-label w60">操作时间：</label>
            <div class="l">
                <input class="form-i w120 sitem" name="start_time" value="{$smarty.get.start_time}" autocomplete="off" onclick="WdatePicker()" type="text">
                <input style="margin-left:-1px" class="form-i w120 sitem" name="end_time" value="{$smarty.get.end_time}" autocomplete="off" onclick="WdatePicker()" type="text">
            </div>
            <button type="submit" style="margin-left:10px; margin-top:1px" class="uiBtn BtnBlue e2-member-searchlog-1">搜索</button>
        </div>
    </form>

    <table class="list">
        <thead>
        <tr>
            <th class="w40">ID</th>
            <th>会员名</th>
            <th class="w80">第三方支付</th>
            <th class="w80">可用余额</th>
            <th class="w80">冻结金额</th>
            <th class="w80">{$L.unit_db_points}</th>
            <th class="w80">{$L.unit_pay_points}</th>
            <th class="w80">经验值</th>
            <th class="w160">操作类型</th>
            <th class="w160">操作时间</th>
            <th class="title">操作描述</th>
        </tr>
        </thead>
        <tbody>
        {foreach from=$list item=m}
        <tr class="opera">
            <td>{$m.id}</td>
            <td>{$m.username}</td>
            <td>{if $m.amount gt 0}<b class="c-green">{$m.amount}</b>{elseif $m.amount lt 0}<b class="c-orange">{$m.amount}</b>{else}{$m.amount}{/if}</td>
            <td>{if $m.user_money gt 0}<b class="c-green">{$m.user_money}</b>{elseif $m.user_money lt 0}<b class="c-orange">{$m.user_money}</b>{else}{$m.user_money}{/if}</td>
            <td>{if $m.frozen_money gt 0}<b class="c-green">{$m.frozen_money}</b>{elseif $m.frozen_money lt 0}<b class="c-orange">{$m.frozen_money}</b>{else}{$m.frozen_money}{/if}</td>
            <td>{if $m.db_points gt 0}<b class="c-green">{$m.db_points}</b>{elseif $m.db_points lt 0}<b class="c-orange">{$m.db_points}</b>{else}{$m.db_points}{/if}</td>
            <td>{if $m.pay_points gt 0}<b class="c-green">{$m.pay_points}</b>{elseif $m.pay_points lt 0}<b class="c-orange">{$m.pay_points}</b>{else}{$m.pay_points}{/if}</td>
            <td>{if $m.rank_points gt 0}<b class="c-green">{$m.rank_points}</b>{elseif $m.rank_points lt 0}<b class="c-orange">{$m.rank_points}</b>{else}{$m.rank_points}{/if}</td>
            <td>{$m.stage}</td>
            <td>{date('Y-m-d H:i',$m.logtime)}</td>
            <td class="title">{$m.desc}</td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {$page}

</div>

<script src="/js/manage/member.js"></script>
{literal}
<script>
    $.loadJs('/admin/js/manage/member.js',function(){
    });
    var menus = $('#page_container a'), i;
    for(i = 0;i < menus.length;i++){
        menus[i].onclick = function() {
            var page = this.rel;
            member.search(page);
        }
    }
</script>
{/literal}